package com.jeesite.modules.rt.entity;

import javax.validation.constraints.Size;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

import java.util.Date;

/**
 * 报警表Entity
 * @author 李寒冰
 * @version 2024-12-02
 */
@Table(name="rt_error", alias="a", label="报警表信息", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="sn", attrName="sn", label="SN号"),
		@Column(name="module", attrName="module", label="报警模块"),
		@Column(name="item", attrName="item", label="报警项报警项报警项"),
		@Column(name="alarm_level", attrName="alarmLevel", label="报警级别", comment="报警级别（一般，重要，严重）"),
		@Column(name="alarm_type", attrName="alarmType", label="报警类别", comment="报警类别（报警，优化）"),
		@Column(name="recommend", attrName="recommend", label="建议"),
		@Column(name="times", attrName="times", label="近24小时报警次数"),
		@Column(name="create_time", attrName="createTime", label="报警时间"),
	}, orderBy="a.id DESC"
)
public class RtError extends DataEntity<RtError> {
	
	private static final long serialVersionUID = 1L;
	private String sn;		// SN号
	private String module;		// 报警模块
	private String item;		// 报警项报警项报警项
	private String alarmLevel;		// 报警级别（一般，重要，严重）
	private String alarmType;		// 报警类别（报警，优化）
	private String recommend;		// 建议
	private Integer times;		// 近24小时报警次数
	private Date createTime;

	public RtError() {
		this(null);
	}
	
	public RtError(String id){
		super(id);
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Size(min=0, max=255, message="SN号长度不能超过 255 个字符")
	public String getSn() {
		return sn;
	}

	public void setSn(String sn) {
		this.sn = sn;
	}
	
	@Size(min=0, max=255, message="报警模块长度不能超过 255 个字符")
	public String getModule() {
		return module;
	}

	public void setModule(String module) {
		this.module = module;
	}
	
	@Size(min=0, max=255, message="报警项报警项报警项长度不能超过 255 个字符")
	public String getItem() {
		return item;
	}

	public void setItem(String item) {
		this.item = item;
	}

	public String getAlarmLevel() {
		return alarmLevel;
	}

	public void setAlarmLevel(String alarmLevel) {
		this.alarmLevel = alarmLevel;
	}

	public String getAlarmType() {
		return alarmType;
	}

	public void setAlarmType(String alarmType) {
		this.alarmType = alarmType;
	}

	@Size(min=0, max=255, message="建议长度不能超过 255 个字符")
	public String getRecommend() {
		return recommend;
	}

	public void setRecommend(String recommend) {
		this.recommend = recommend;
	}
	
	public Integer getTimes() {
		return times;
	}

	public void setTimes(Integer times) {
		this.times = times;
	}
	
}